300
|
How do I get the handle of the cell
![](images/exganttq300.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
CellBold[Null,OleVariant(ItemCell[h,OleVariant(0)])] := True;
end;
end
|
299
|
How do I retrieve the focused item
![](images/exganttq299.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
ItemBold[FocusItem] := True;
end;
end
|
298
|
How do I get the number or count of child items
![](images/exganttq298.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
AddItem(OleVariant(ChildCount[h]));
end;
end
|
297
|
How do I enumerate the visible items
![](images/exganttq297.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
ItemBold[FirstVisibleItem] := True;
ItemBold[NextVisibleItem[FirstVisibleItem]] := True;
end;
end
|
296
|
How do I enumerate the siblings items
![](images/exganttq296.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
ItemBold[NextSiblingItem[FirstVisibleItem]] := True;
ItemBold[PrevSiblingItem[NextSiblingItem[FirstVisibleItem]]] := True;
end;
end
|
295
|
How do I get the parent item
![](images/exganttq295.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
ItemBold[ItemParent[ItemChild[h]]] := True;
end;
end
|
294
|
How do I get the first child item
![](images/exganttq294.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
ItemBold[ItemChild[h]] := True;
end;
end
|
293
|
How do I enumerate the root items
![](images/exganttq293.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ItemBold[RootItem[0]] := True;
ItemUnderline[RootItem[1]] := True;
end;
end
|
292
|
I have a hierarchy, how can I count the number of root items
![](images/exganttq292.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
AddItem(OleVariant(RootCount));
end;
end
|
291
|
How can I make an item unselectable, or not selectable
![](images/exganttq291.png)
with Gantt1 do
begin
Columns.Add('Column');
with Items do
begin
h := AddItem('unselectable - you can''t get selected');
SelectableItem[h] := False;
AddItem('selectable');
end;
end
|
290
|
How can I hide or show an item
![](images/exganttq290.png)
with Gantt1 do
begin
Columns.Add('Column');
with Items do
begin
h := AddItem('hidden');
ItemHeight[h] := 0;
SelectableItem[h] := False;
AddItem('visible');
end;
end
|
289
|
How can I change the height for all items
![](images/exganttq289.png)
with Gantt1 do
begin
DefaultItemHeight := 32;
Columns.Add('Column');
Items.AddItem('One');
Items.AddItem('Two');
end
|
288
|
How do I change the height of an item
![](images/exganttq288.png)
with Gantt1 do
begin
ScrollBySingleLine := True;
Columns.Add('Default');
with Items do
begin
ItemHeight[AddItem('height')] := 128;
end;
Items.AddItem('enabled');
end
|
287
|
How do I disable or enable an item
![](images/exganttq287.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
EnableItem[AddItem('disabled')] := False;
end;
Items.AddItem('enabled');
end
|
286
|
How do I display as strikeout a cell
![](images/exganttq286.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
CellStrikeOut[OleVariant(AddItem('strikeout')),OleVariant(0)] := True;
end;
end
|
285
|
How do I display as strikeout a cell or an item
![](images/exganttq285.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
CellCaptionFormat[OleVariant(AddItem('gets <s>strikeout</s> only a portion of text')),OleVariant(0)] := EXGANTTLib_TLB.exHTML;
end;
end
|
284
|
How do I display as strikeout an item
![](images/exganttq284.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
ItemStrikeOut[AddItem('strikeout')] := True;
end;
end
|
283
|
How do I underline a cell
![](images/exganttq283.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
CellUnderline[OleVariant(AddItem('underline')),OleVariant(0)] := True;
end;
end
|
282
|
How do I underline a cell or an item
![](images/exganttq282.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
CellCaptionFormat[OleVariant(AddItem('gets <u>underline</u> only a portion of text')),OleVariant(0)] := EXGANTTLib_TLB.exHTML;
end;
end
|
281
|
How do I underline an item
![](images/exganttq281.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
ItemUnderline[AddItem('underline')] := True;
end;
end
|
280
|
How do I display as italic a cell
![](images/exganttq280.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
CellItalic[OleVariant(AddItem('italic')),OleVariant(0)] := True;
end;
end
|
279
|
How do I display as italic a cell or an item
![](images/exganttq279.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
CellCaptionFormat[OleVariant(AddItem('gets <i>italic</i> only a portion of text')),OleVariant(0)] := EXGANTTLib_TLB.exHTML;
end;
end
|
278
|
How do I display as italic an item
![](images/exganttq278.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
ItemItalic[AddItem('italic')] := True;
end;
end
|
277
|
How do I bold a cell
![](images/exganttq277.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
CellBold[OleVariant(AddItem('bold')),OleVariant(0)] := True;
end;
end
|
276
|
How do I bold a cell or an item
![](images/exganttq276.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
CellCaptionFormat[OleVariant(AddItem('gets <b>bold</b> only a portion of text')),OleVariant(0)] := EXGANTTLib_TLB.exHTML;
end;
end
|
275
|
How do I bold an item
![](images/exganttq275.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
ItemBold[AddItem('bold')] := True;
end;
end
|
274
|
How do I change the foreground color for the item
![](images/exganttq274.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Null,'Child 1');
ItemForeColor[hC] := $ff;
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
273
|
How do I change the visual appearance for the item, using your EBN technology
![](images/exganttq273.png)
with Gantt1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Null,'Child 1');
ItemBackColor[hC] := $1000000;
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
272
|
How do I change the background color for the item
![](images/exganttq272.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Null,'Child 1');
ItemBackColor[hC] := $ff;
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
271
|
How do I expand or collapse an item
![](images/exganttq271.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
270
|
How do I associate an extra data to an item
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
ItemData[AddItem('item')] := 'your extra data';
end;
end
|
269
|
How do I get the number or count of items
![](images/exganttq269.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
with Items do
begin
AddItem(OleVariant(ItemCount));
end;
end
|
268
|
How can I specify the width of the ActiveX control, when using the InsertControlItem property
![](images/exganttq268.png)
with Gantt1 do
begin
ScrollBySingleLine := False;
TreeColumnIndex := 1;
DrawGridLines := EXGANTTLib_TLB.exAllLines;
Columns.Add('C1');
Columns.Add('C2');
Columns.Add('C3');
with Items do
begin
h := InsertControlItem(Null,'MSCAL.Calendar',Null);
ItemWidth[h] := 128;
CellCaption[OleVariant(h),OleVariant(0)] := 'This is a bit of text that is shown in the first column';
CellSingleLine[OleVariant(h),OleVariant(0)] := EXGANTTLib_TLB.exCaptionWordWrap;
CellCaption[OleVariant(h),OleVariant(2)] := 'This is a bit of text that is shown in the third column';
CellSingleLine[OleVariant(h),OleVariant(2)] := EXGANTTLib_TLB.exCaptionWordWrap;
end;
end
|
267
|
How can I put the ActiveX control in a different column, when using the InsertControlItem property
![](images/exganttq267.png)
with Gantt1 do
begin
ScrollBySingleLine := False;
DrawGridLines := EXGANTTLib_TLB.exAllLines;
Columns.Add('C1');
Columns.Add('C2');
Columns.Add('C3');
with Items do
begin
h := InsertControlItem(Null,'MSCAL.Calendar',Null);
CellCaption[OleVariant(h),OleVariant(0)] := 'This is a bit of text that is shown in the first column';
CellSingleLine[OleVariant(h),OleVariant(0)] := EXGANTTLib_TLB.exCaptionWordWrap;
ItemWidth[h] := -32001;
CellCaption[OleVariant(h),OleVariant(2)] := 'This is a bit of text that is shown in the third column';
CellSingleLine[OleVariant(h),OleVariant(2)] := EXGANTTLib_TLB.exCaptionWordWrap;
end;
end
|
266
|
Is there any function I can use to get the program or the control identifier I've been using when called the InsertControlItem
![](images/exganttq266.png)
with Gantt1 do
begin
Columns.Add('Default');
ScrollBySingleLine := False;
LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
with Items do
begin
h := InsertControlItem(Null,'MSCAL.Calendar',Null);
InsertItem(h,Null,OleVariant(ItemControlID[h]));
ExpandItem[h] := True;
h := InsertControlItem(Null,'MSChart20Lib.MSChart',Null);
ItemAppearance[h] := EXGANTTLib_TLB.Etched;
InsertItem(h,Null,OleVariant(ItemControlID[h]));
ExpandItem[h] := True;
end;
end
|
265
|
How can I change the height of newly created ActiveX control, using the InsertControlItem
![](images/exganttq265.png)
with Gantt1 do
begin
Columns.Add('Default');
ScrollBySingleLine := False;
with Items do
begin
ItemHeight[InsertControlItem(Null,'MSCAL.Calendar',Null)] := 64;
ItemAppearance[InsertControlItem(Null,'MSChart20Lib.MSChart',Null)] := EXGANTTLib_TLB.Etched;
end;
end
|
264
|
How can I change the border for newly created ActiveX control, using the InsertControlItem
![](images/exganttq264.png)
with Gantt1 do
begin
Columns.Add('Default');
ScrollBySingleLine := False;
with Items do
begin
ItemAppearance[InsertControlItem(Null,'MSCAL.Calendar',Null)] := EXGANTTLib_TLB.Sunken;
ItemAppearance[InsertControlItem(Null,'MSChart20Lib.MSChart',Null)] := EXGANTTLib_TLB.Etched;
end;
end
|
263
|
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
![](images/exganttq263.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
with (IUnknown(ItemObject[InsertControlItem(h,'MSCAL.Calendar',Null)]) as MSACAL_TLB.Calendar) do
begin
BackColor := $ffffff;
GridCellEffect := 0;
ShowTitle := False;
ShowDateSelectors := False;
end;
ExpandItem[h] := True;
end;
end
|
262
|
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
![](images/exganttq262.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
with (IUnknown(ItemObject[InsertControlItem(h,'MSCAL.Calendar',Null)]) as MSACAL_TLB.Calendar) do
begin
BackColor := $ffffff;
end;
ExpandItem[h] := True;
end;
end
|
261
|
How can I insert an ActiveX control
![](images/exganttq261.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertControlItem(h,'MSCAL.Calendar',Null);
ExpandItem[h] := True;
end;
end
|
260
|
How do I programmatically edit a cell
![](images/exganttq260.png)
with Gantt1 do
begin
AllowEdit := True;
with Items do
begin
Edit(OleVariant(FocusItem),OleVariant(0));
end;
end
|
259
|
How can I change at runtime the parent of the item
![](images/exganttq259.png)
with Gantt1 do
begin
LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
Columns.Add('Default');
with Items do
begin
hP := AddItem('Root');
hC := AddItem('Child');
SetParent(hC,hP);
end;
end
|
258
|
How can I sort the items
![](images/exganttq258.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
Columns.Item['Default'].SortOrder := EXGANTTLib_TLB.SortDescending;
end
|
257
|
How do I sort the child items
![](images/exganttq257.png)
with Gantt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
SortChildren(h,OleVariant(0),False);
end;
end
|
256
|
How can I ensure or scroll the control so the item fits the control's client area
with Gantt1 do
begin
Columns.Add('Default');
h := Items.AddItem('item');
Items.EnsureVisibleItem(h);
end
|
255
|
How can I remove or delete all items
with Gantt1 do
begin
Columns.Add('Default');
Items.AddItem('removed item');
Items.RemoveAllItems();
end
|
254
|
How can I remove or delete an item
with Gantt1 do
begin
Columns.Add('Default');
h := Items.AddItem('removed item');
Items.RemoveItem(h);
end
|
253
|
How can I add or insert child items
![](images/exganttq253.png)
with Gantt1 do
begin
LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[OleVariant(h),OleVariant(1)] := 'Cell 2';
CellCaption[OleVariant(InsertItem(h,Null,'Cell 3')),OleVariant(1)] := 'Cell 4';
CellCaption[OleVariant(InsertItem(h,Null,'Cell 5')),OleVariant(1)] := 'Cell 6';
ExpandItem[h] := True;
end;
end
|
252
|
How can I add or insert a child item
![](images/exganttq252.png)
with Gantt1 do
begin
LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
Columns.Add('Default');
with Items do
begin
InsertItem(AddItem('root'),Null,'child');
end;
end
|
251
|
How can I add or insert an item
![](images/exganttq251.png)
with Gantt1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
CellCaption[OleVariant(AddItem('Cell 1')),OleVariant(1)] := 'Cell 2';
h := AddItem('Cell 3');
CellCaption[OleVariant(h),OleVariant(1)] := 'Cell 4';
end;
end
|
250
|
How can I add or insert an item
![](images/exganttq250.png)
with Gantt1 do
begin
Columns.Add('Default');
Items.AddItem('new item');
end
|
249
|
How can I get the columns as they are shown in the control's sortbar
with Gantt1 do
begin
var_Object := (IUnknown(Columns.ItemBySortPosition[OleVariant(0)]) as _TLB.Object);
end
|
248
|
How can I access the properties of a column
![](images/exganttq248.png)
with Gantt1 do
begin
Columns.Add('A');
Columns.Item['A'].HeaderBold := True;
end
|
247
|
How can I remove all the columns
with Gantt1 do
begin
Columns.Clear();
end
|
246
|
How can I remove a column
with Gantt1 do
begin
Columns.Remove('A');
end
|
245
|
How can I get the number or the count of columns
with Gantt1 do
begin
var_Count := Columns.Count;
end
|
244
|
How can I change the font for all cells in the entire column
![](images/exganttq244.png)
with Gantt1 do
begin
f := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('StdFont'))) as stdole_TLB.StdFont);
with f do
begin
Name := 'Tahoma';
Size := 12;
end;
with ConditionalFormats.Add('1',Null) do
begin
Font := (IUnknown(f) as stdole_TLB.StdFont);
ApplyTo := EXGANTTLib_TLB.exFormatToColumns;
end;
Columns.Add('Column');
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
243
|
How can I change the background color for all cells in the column
![](images/exganttq243.png)
with Gantt1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Null);
with var_ConditionalFormat do
begin
BackColor := $ff;
ApplyTo := EXGANTTLib_TLB.exFormatToColumns;
end;
Columns.Add('Column');
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
242
|
How can I change the foreground color for all cells in the column
![](images/exganttq242.png)
with Gantt1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Null);
with var_ConditionalFormat do
begin
ForeColor := $ff;
ApplyTo := EXGANTTLib_TLB.exFormatToColumns;
end;
Columns.Add('Column');
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
241
|
How can I show as strikeout all cells in the column
![](images/exganttq241.png)
with Gantt1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Null);
with var_ConditionalFormat do
begin
StrikeOut := True;
ApplyTo := EXGANTTLib_TLB.exFormatToColumns;
end;
Columns.Add('Column');
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
240
|
How can I underline all cells in the column
![](images/exganttq240.png)
with Gantt1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Null);
with var_ConditionalFormat do
begin
Underline := True;
ApplyTo := EXGANTTLib_TLB.exFormatToColumns;
end;
Columns.Add('Column');
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
239
|
How can I show in italic all data in the column
![](images/exganttq239.png)
with Gantt1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Null);
with var_ConditionalFormat do
begin
Italic := True;
ApplyTo := EXGANTTLib_TLB.exFormatToColumns;
end;
Columns.Add('Column');
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
238
|
How can I bold the entire column
![](images/exganttq238.png)
with Gantt1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Null);
with var_ConditionalFormat do
begin
Bold := True;
ApplyTo := EXGANTTLib_TLB.exFormatToColumns;
end;
Columns.Add('Column');
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
237
|
How can I display a computed column and highlight some values that are negative or less than a value
![](images/exganttq237.png)
with Gantt1 do
begin
Columns.Add('A');
Columns.Add('B');
(IUnknown(Columns.Add('(A+B)*1.19')) as EXGANTTLib_TLB.Column).ComputedField := '(%0 + %1) * 1.19';
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(1))),OleVariant(1)] := OleVariant(2);
end;
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(10))),OleVariant(1)] := OleVariant(20);
end;
var_ConditionalFormat := ConditionalFormats.Add('%2 > 10',Null);
with var_ConditionalFormat do
begin
Bold := True;
ForeColor := $ff;
ApplyTo := EXGANTTLib_TLB.FormatApplyToEnum($2);
end;
end
|
236
|
Can I display a computed column so it displays the VAT, or SUM
![](images/exganttq236.png)
with Gantt1 do
begin
Columns.Add('A');
Columns.Add('B');
(IUnknown(Columns.Add('(A+B)*1.19')) as EXGANTTLib_TLB.Column).ComputedField := '(%0 + %1) * 1.19';
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(1))),OleVariant(1)] := OleVariant(2);
end;
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(10))),OleVariant(1)] := OleVariant(20);
end;
end
|
235
|
How can I show a column that adds values in the cells
![](images/exganttq235.png)
with Gantt1 do
begin
Columns.Add('A');
Columns.Add('B');
(IUnknown(Columns.Add('A+B')) as EXGANTTLib_TLB.Column).ComputedField := '%0 + %1';
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(1))),OleVariant(1)] := OleVariant(2);
end;
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(10))),OleVariant(1)] := OleVariant(20);
end;
end
|
234
|
Is there any function to filter the control's data as I type, so the items being displayed include the typed characters
![](images/exganttq234.png)
with Gantt1 do
begin
var_Column := (IUnknown(Columns.Add('Filter')) as EXGANTTLib_TLB.Column);
with var_Column do
begin
FilterOnType := True;
DisplayFilterButton := True;
AutoSearch := EXGANTTLib_TLB.exContains;
end;
Items.AddItem('Canada');
Items.AddItem('USA');
end
|
233
|
Is there any function to filter the control's data as I type, something like filter on type
![](images/exganttq233.png)
with Gantt1 do
begin
var_Column := (IUnknown(Columns.Add('Filter')) as EXGANTTLib_TLB.Column);
with var_Column do
begin
FilterOnType := True;
DisplayFilterButton := True;
end;
Items.AddItem('Canada');
Items.AddItem('USA');
end
|
232
|
How can I programmatically filter a column
![](images/exganttq232.png)
with Gantt1 do
begin
with (IUnknown(Columns.Add('Filter')) as EXGANTTLib_TLB.Column) do
begin
DisplayFilterButton := True;
FilterType := EXGANTTLib_TLB.exNonBlanks;
end;
Items.AddItem(Null);
Items.AddItem('not empty');
ApplyFilter();
end
|
231
|
How can I show or display the control's filter
![](images/exganttq231.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('Filter')) as EXGANTTLib_TLB.Column).DisplayFilterButton := True;
end
|
230
|
How can I customize the items being displayed in the drop down filter window
![](images/exganttq230.png)
with Gantt1 do
begin
with (IUnknown(Columns.Add('Custom Filter')) as EXGANTTLib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
CustomFilter := 'Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||Text Documents (*.log,*.txt)||*.t' +
'xt|*.log';
FilterType := EXGANTTLib_TLB.exPattern;
Filter := '*.xls';
end;
Items.AddItem('excel.xls');
Items.AddItem('word.doc');
Items.AddItem('pp.pps');
Items.AddItem('text.txt');
ApplyFilter();
end
|
229
|
How can I change the order or the position of the columns in the sort bar
![](images/exganttq229.png)
with Gantt1 do
begin
SortBarVisible := True;
SortBarColumnWidth := 48;
(IUnknown(Columns.Add('C1')) as EXGANTTLib_TLB.Column).SortOrder := EXGANTTLib_TLB.SortAscending;
(IUnknown(Columns.Add('C2')) as EXGANTTLib_TLB.Column).SortOrder := EXGANTTLib_TLB.SortDescending;
Columns.Item['C2'].SortPosition := 0;
end
|
228
|
How do I arrange my columns on multiple levels
![](images/exganttq228.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('S')) as EXGANTTLib_TLB.Column).Width := 32;
(IUnknown(Columns.Add('Level 2')) as EXGANTTLib_TLB.Column).LevelKey := OleVariant(1);
(IUnknown(Columns.Add('Level 3')) as EXGANTTLib_TLB.Column).LevelKey := OleVariant(1);
(IUnknown(Columns.Add('Level 4')) as EXGANTTLib_TLB.Column).LevelKey := OleVariant(1);
(IUnknown(Columns.Add('Level 1')) as EXGANTTLib_TLB.Column).LevelKey := '2';
(IUnknown(Columns.Add('Level 2')) as EXGANTTLib_TLB.Column).LevelKey := '2';
(IUnknown(Columns.Add('Level 3')) as EXGANTTLib_TLB.Column).LevelKey := '2';
(IUnknown(Columns.Add('Level 4')) as EXGANTTLib_TLB.Column).LevelKey := '2';
(IUnknown(Columns.Add('E')) as EXGANTTLib_TLB.Column).Width := 32;
end
|
227
|
How do I arrange my columns on multiple lines
![](images/exganttq227.png)
with Gantt1 do
begin
HeaderHeight := 32;
(IUnknown(Columns.Add('')) as EXGANTTLib_TLB.Column).HTMLCaption := 'Line 1<br>Line 2';
end
|
226
|
How can I display all cells using HTML format
![](images/exganttq226.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('HTML')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
Items.AddItem('<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.');
end
|
225
|
How can I display all cells using multiple lines
![](images/exganttq225.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('MultipleLine')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellSingleLine] := OleVariant(False);
(IUnknown(Columns.Add('SingleLine')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellSingleLine] := OleVariant(True);
with Items do
begin
CellCaption[OleVariant(AddItem('This is a bit of long text that should break the line')),OleVariant(1)] := 'this is a bit of long text that''s displayed on a single line';
end;
end
|
224
|
How do change the vertical alignment for all cells in the column
![](images/exganttq224.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('MultipleLine')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellSingleLine] := OleVariant(False);
(IUnknown(Columns.Add('VAlign')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellVAlignment] := OleVariant(2);
with Items do
begin
CellCaption[OleVariant(AddItem('This is a bit of long text that should break the line')),OleVariant(1)] := 'bottom';
end;
with Items do
begin
CellCaption[OleVariant(AddItem('This is a bit of long text that should break the line')),OleVariant(1)] := 'bottom';
end;
end
|
223
|
How do change the foreground color for all cells in the column
![](images/exganttq223.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('ForeColor')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellForeColor] := OleVariant(255);
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
222
|
How do change the background color for all cells in the column
![](images/exganttq222.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('BackColor')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellBackColor] := OleVariant(255);
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
221
|
How do I show buttons for all cells in the column
![](images/exganttq221.png)
with Gantt1 do
begin
with (IUnknown(Columns.Add('Button')) as EXGANTTLib_TLB.Column) do
begin
Def[EXGANTTLib_TLB.exCellHasButton] := OleVariant(True);
Def[EXGANTTLib_TLB.exCellButtonAutoWidth] := OleVariant(True);
end;
Items.AddItem(' Button 1 ');
Items.AddItem(' Button 2 ');
end
|
220
|
How do I show buttons for all cells in the column
![](images/exganttq220.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('Button')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellHasButton] := OleVariant(True);
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
219
|
How do I display radio buttons for all cells in the column
![](images/exganttq219.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('Radio')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellHasRadioButton] := OleVariant(True);
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
218
|
How do I display checkboxes for all cells in the column
![](images/exganttq218.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('Check')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
217
|
How can I display a tooltip when the cursor hovers the column
![](images/exganttq217.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('tooltip')) as EXGANTTLib_TLB.Column).ToolTip := 'This is a bit of text that is shown when user hovers the column.';
end
|
216
|
Is there any function to assign a key to a column instead using its name or capion
with Gantt1 do
begin
(IUnknown(Columns.Add('Data')) as EXGANTTLib_TLB.Column).Key := 'DKey';
Columns.Item['DKey'].Caption := 'new caption';
end
|
215
|
Is there any function to assign any extra data to a column
with Gantt1 do
begin
(IUnknown(Columns.Add('Data')) as EXGANTTLib_TLB.Column).Data := 'your extra data';
end
|
214
|
By default, the column gets sorted descending, when I first click its header. How can I change so the column gets sorted ascending when the user first clicks the column's header
![](images/exganttq214.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('Sort')) as EXGANTTLib_TLB.Column).DefaultSortOrder := True;
end
|
213
|
How can I specify the maximum width for the column, if I use WidthAutoResize property
![](images/exganttq213.png)
with Gantt1 do
begin
with (IUnknown(Columns.Add('Auto')) as EXGANTTLib_TLB.Column) do
begin
WidthAutoResize := True;
MinWidthAutoResize := 32;
MaxWidthAutoResize := 128;
end;
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
212
|
How can I specify the minimum width for the column, if I use WidthAutoResize property
![](images/exganttq212.png)
with Gantt1 do
begin
with (IUnknown(Columns.Add('Auto')) as EXGANTTLib_TLB.Column) do
begin
WidthAutoResize := True;
MinWidthAutoResize := 32;
end;
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
211
|
Is there any option to resize the column based on its data, captions
![](images/exganttq211.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('A')) as EXGANTTLib_TLB.Column).WidthAutoResize := True;
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
210
|
How can I align the icon in the column's header in the center
![](images/exganttq210.png)
with Gantt1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
with (IUnknown(Columns.Add('')) as EXGANTTLib_TLB.Column) do
begin
HeaderImage := 1;
HeaderImageAlignment := EXGANTTLib_TLB.CenterAlignment;
end;
end
|
209
|
How do I align the icon in the column's header to the right
![](images/exganttq209.png)
with Gantt1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
with (IUnknown(Columns.Add('ColumnName')) as EXGANTTLib_TLB.Column) do
begin
HeaderImage := 1;
HeaderImageAlignment := EXGANTTLib_TLB.RightAlignment;
end;
end
|
208
|
How do I show or hide the sorting icons, but still need sorting
with Gantt1 do
begin
(IUnknown(Columns.Add('Sorted')) as EXGANTTLib_TLB.Column).SortOrder := EXGANTTLib_TLB.SortAscending;
Columns.Item[OleVariant(0)].DisplaySortIcon := False;
end
|
207
|
How do I enable or disable the entire column
![](images/exganttq207.png)
with Gantt1 do
begin
Columns.Add('C1');
(IUnknown(Columns.Add('Disabled')) as EXGANTTLib_TLB.Column).Enabled := False;
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(0))),OleVariant(1)] := '0.1';
end;
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(1))),OleVariant(1)] := '1.1';
end;
end
|
206
|
How do I disable drag and drop columns
with Gantt1 do
begin
(IUnknown(Columns.Add('C1')) as EXGANTTLib_TLB.Column).AllowDragging := False;
(IUnknown(Columns.Add('C2')) as EXGANTTLib_TLB.Column).AllowDragging := False;
end
|
205
|
How do I disable resizing a column at runtime
with Gantt1 do
begin
(IUnknown(Columns.Add('Unsizable')) as EXGANTTLib_TLB.Column).AllowSizing := False;
Columns.Add('C2');
Columns.Add('C3');
Columns.Add('C4');
end
|
204
|
How can I align the column to the right, and its caption too
![](images/exganttq204.png)
with Gantt1 do
begin
with (IUnknown(Columns.Add('Column')) as EXGANTTLib_TLB.Column) do
begin
Alignment := EXGANTTLib_TLB.RightAlignment;
HeaderAlignment := EXGANTTLib_TLB.RightAlignment;
end;
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
203
|
How can I align the column to the right
![](images/exganttq203.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('Column')) as EXGANTTLib_TLB.Column).Alignment := EXGANTTLib_TLB.RightAlignment;
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
end
|
202
|
How do I change the column's caption
![](images/exganttq202.png)
with Gantt1 do
begin
(IUnknown(Columns.Add('Column')) as EXGANTTLib_TLB.Column).Caption := 'new caption';
end
|
201
|
Can I change the visual effect, appearance for the anchor, hyperlink elements, in HTML captions, after the user clicks it
![](images/exganttq201.png)
with Gantt1 do
begin
FormatAnchor[False] := '<b><u><fgcolor=880000> </fgcolor></u></b>';
Columns.Add('Column');
with Items do
begin
CellCaptionFormat[OleVariant(AddItem('Just an <a1>anchor</a> element ...')),OleVariant(0)] := EXGANTTLib_TLB.exHTML;
end;
with Items do
begin
CellCaptionFormat[OleVariant(AddItem('Just another <a2>anchor</a> element ...')),OleVariant(0)] := EXGANTTLib_TLB.exHTML;
end;
Items.AddItem('next item');
end
|